package hDOJ;

/*

1
50.00
25.00
10.00
2
50.00
25.00
10.00
20.00

27.50
15.00

2*Ai = Ai-1 + Ai+1 - 2Ci
Ai - Ai-1 = Ai+1 - Ai + 2Ci
设Ai - Ai-1 = di
则di+1 = di + 2Ci
A1 - A0 = d1
A2 - A1 = d1 + 2C1
A3 - A2 = d1 + 2C1 + 2C2
...
An - An-1 = d1 + 2C1 + 2C2 + ... + 2Cn-1
An+1 - An = d1 + 2C1 + 2C2 + ... + 2Cn-1 + 2Cn
累加上式得：
-A0 + An+1 = (n+1)d1 + 2*(nC1 + (n-1)C2 + ... + Cn)
把A1 - A0 = d1带入上式消掉d1得:
-A0 + An+1 = (n+1)(A1 - A0) + 2*(nC1 + (n-1)C2 + ... + Cn)
(n+1)(A1 - A0) = -A0 + An+1 - 2*(nC1 + (n-1)C2 + ... + Cn)
A1 = (1/(n+1)) * (-A0 + An+1 - 2*(nC1 + (n-1)C2 + ... + Cn)) + A0
A1 = (nA0 + An+1 - 2*(nC1 + (n-1)C2 + ... + Cn))/(n+1)

md,sumC += 打成了 = ，反复检查没查出来，真的蠢，有时候真的会因为一个很小问题浪费很多时间
    
 */

import java.util.Scanner;

public class Main2086 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int n = sc.nextInt();
            double A0 = sc.nextDouble();
            double An$1 = sc.nextDouble();
            double sumC = 0;
            for(int i = 1; i <= n; i++) {
                double Ci = sc.nextDouble();
                sumC += (n-i+1) * Ci;
            }
            double A1 = (n*A0 + An$1 - 2*sumC)/(n+1);
            System.out.printf("%.2f", A1);
            System.out.println();
        }
    }
}
